
<div class="container">
	<div class="demo-row">
		<h2 class="text-success text-center">Change Status</h2>
		 <div class="alert alert-info" ng-show="error">{{errorMessage}}</div>
		                          
		  <div class="alert alert-info" ng-show="listUsers.length == 0">
                                No User found
          </div>
		<table class="table table-striped table-bordered table-hover" datatable="ng" ng-show="listUsers.length > 0">
			 <thead>
				 <tr>
				 	<th><span class="fui-user"></span>Login Id</th>
				 	<th>ID Card Number</th>
				 	<th>First Name</th>
				 	<th>Last Name</th>
				 	<th>Phone 1</th>
				 	<th>Address 1</th>
				 	<th>Email 1</th>
				 	<th>Detail</th>
				 	<th>Change</th>
				 <tr>
			 </thead>
			 <tbody>
			 	
			 		<tr ng-repeat="user in listUsers">
			 			<td><span class="fui-user"></span>{{user.loginId}}</td>
			 			<td>{{user.cardnumberid}}</td>
			 			<td>{{user.firstname}}</td>
			 			<td>{{user.lastname}}</td>
			 			<td>{{user.phone1}}</td>
			 			<td>{{user.address1}}</td>
			 			<td>{{user.email1}}</td>
			 			<td><button class="btn btn-info" ng-click="openInfo(user.loginId)"><span class="fui-eye"></span>View</button></td>
			 			<td><button class="btn btn-success" ng-show="user.statusid == 'status01'" ng-click="activeUser(user.loginId)"><span class="fui-check-circle"></span>Active</button>
                            <button class="btn btn-danger" ng-show="user.statusid == 'status02'"  ng-click="disableUser(user.loginId)"><span class="fui-cross-circle"></span>Disable</button>
                            <button class="btn btn-warning" ng-show="user.statusid == 'status03'" ng-click="activeUser(user.loginId)"><span class="fui-check-circle"></span>Active</button>
                        </td>
			 		</tr>
			 	
			 </tbody>
		</table>
	</div>
</div>

 <script type="text/ng-template" id="status.html">
        <div class="modal-header">
            <h3 class="modal-title">Detail User</h3>
        </div>
        <div class="modal-body">
            <form class="form-horizontal" role="form"">
                   <div class="form-group">
                          <label for="inputLoginId" class="col-sm-3 control-label">Login Id</label>
                          <div class="col-sm-7">
                                <input readonly="true" type="text" class="form-control" value="{{user.loginId}}">
                          </div>
                   </div>
                   <div class="form-group">
                          <label for="inputLoginId" class="col-sm-3 control-label">Password</label>
                          <div class="col-sm-7">
                                <input type="password" class="form-control" value="{{user.password}}">
                          </div>
                   </div>
                   <div class="form-group">
                          <label for="inputLoginId" class="col-sm-3 control-label">Id Card Number</label>
                          <div class="col-sm-7">
                                 <input type="text" class="form-control" value="{{user.cardnumberid}}">
                          </div>
                   </div>
                   <div class="form-group">
                   		  <label for="inputLoginId" class="col-sm-3 control-label">First Name</label>
                          <div class="col-sm-7">
                                 <input type="text" class="form-control" value="{{user.firstname}}">
                  		  </div>
                    </div>
                    <div class="form-group">
                           <label for="inputLoginId" class="col-sm-3 control-label">Last Name</label>
                           <div class="col-sm-7">
                                 <input type="text" class="form-control" value="{{user.lastname}}">
                           </div>
                    </div>
                    <div class="form-group">
                           <label for="inputLoginId" class="col-sm-3 control-label">Mid Name</label>
                           <div class="col-sm-7">
                                  <input type="text" class="form-control" value="{{user.midname}}">
                           </div>
                    </div>
					<div class="form-group">
                           <label for="inputLoginId" class="col-sm-3 control-label">Phone 1</label>
                           <div class="col-sm-7">
                                  <input type="text" class="form-control" value="{{user.phone1}}">
                           </div>
                    </div>
					<div class="form-group">
                           <label for="inputLoginId" class="col-sm-3 control-label">Phone 2</label>
                           <div class="col-sm-7">
                                  <input type="text" class="form-control" value="{{user.phone2}}">
                           </div>
                    </div>
					<div class="form-group">
                           <label for="inputLoginId" class="col-sm-3 control-label">Address 1</label>
                           <div class="col-sm-7">
                                  <input type="text" class="form-control" value="{{user.address1}}">
                           </div>
                    </div>
					<div class="form-group">
                           <label for="inputLoginId" class="col-sm-3 control-label">Address 2</label>
                           <div class="col-sm-7">
                                  <input type="text" class="form-control" value="{{user.address2}}">
                           </div>
                    </div>
					<div class="form-group">
                           <label for="inputLoginId" class="col-sm-3 control-label">Email 1</label>
                           <div class="col-sm-7">
                                  <input type="text" class="form-control" value="{{user.email1}}">
                           </div>
                    </div>
					<div class="form-group">
                           <label for="inputLoginId" class="col-sm-3 control-label">Email 2</label>
                           <div class="col-sm-7">
                                  <input type="text" class="form-control" value="{{user.email2}}">
                           </div>
                    </div>
					<div class="form-group">
                           <label for="inputLoginId" class="col-sm-3 control-label">Avatar</label>
                           <div class="col-sm-7">
                                  <img height="200" width="200" ng-src="{{user.image}}">
                           </div>
                    </div>
            </form>
        </div>
        <div class="modal-footer">
            <button class="btn btn-primary" ng-click="ok()">OK</button>
        </div>
 </script>